<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    

<xsl:template match="/validation">
  <HTML>
	<HEAD>
		<META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=windows-1252"/>
		<TITLE>IQ TOOLS DIFF REPORT</TITLE>
	</HEAD>
	<BODY LANG="en-US" TEXT="#000000" LINK="#0000ff" DIR="LTR">
	<TABLE WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
	<TR>
		<TD VALIGN='TOP'>
			<P><IMG SRC="logo.png" ALIGN="BOTTOM" BORDER="0"/></P>
		</TD>
		<TD>
			<P ALIGN='CENTER'><SPAN><B>IQ TOOLS DIFF REPORT</B></SPAN></P>
			<xsl:apply-templates select="/validation/meta[@mode='simple']"/>
		</TD>
	</TR>
	<TR>
		<TD>
		  <B>Date     : </B><xsl:value-of select="/validation/meta/file1/Date"/><p/>
		  <B>Version  : </B><xsl:value-of select="/validation/meta/file1/Version"/><p/>
		  <B>IP       : </B><xsl:value-of select="/validation/meta/file1/IP"/><p/>
		  <B>Hostname : </B><xsl:value-of select="/validation/meta/file1/Hostname"/><p/>
		</TD>
		<TD>
  		  <B>Date     : </B><xsl:value-of select="/validation/meta/file2/Date"/><p/>
		  <B>Version  : </B><xsl:value-of select="/validation/meta/file2/Version"/><p/>
		  <B>IP       : </B><xsl:value-of select="/validation/meta/file2/IP"/><p/>
		  <B>Hostname : </B><xsl:value-of select="/validation/meta/file2/Hostname"/><p/>
		</TD>
	</TR>
	</TABLE>      
	<p/>
	<hr/>
	<p/>
	<p/>
	<xsl:apply-templates select="OperatingSystems"/>
	<xsl:apply-templates select="serverId"/>
	<xsl:apply-templates select="hardware"/>
	<xsl:apply-templates select="softwares"/>
	<xsl:apply-templates select="Services"/>
	<xsl:apply-templates select="hotfixes"/>
	<xsl:apply-templates select="Environments"/>
	<xsl:apply-templates select="directories"/>
  </BODY>
  </HTML>
</xsl:template>

<xsl:template match="meta">
	<P ALIGN='CENTER'><SPAN><B>MODE SIMPLE have been activated</B></SPAN></P>
</xsl:template>

<xsl:template match="OperatingSystems">

<h2>OperatingSystems</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_OperatingSystem">
	<tr><td>missing_OperatingSystem</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_OperatingSystem">
	<tr><td>different_OperatingSystem</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_OperatingSystem">
	<tr><td>additional_OperatingSystem</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="hardware">

<h2>Hardware</h2>

<h3>Memory</h3>
 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="memory"/>    
 </table>
	<hr/>

<h3>Cpu</h3>
 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="cpu"/>    
 </table>
	<hr/>

<h3>Disks</h3>
 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="disks/*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_memory">
	<tr><td>missing_memory</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_memory">
	<tr><td>different_memory</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_memory">
	<tr><td>additional_memory</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="missing_cpu">
	<tr><td>missing_cpu</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_cpu">
	<tr><td>different_cpu</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_cpu">
	<tr><td>additional_cpu</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="missing_disk">
	<tr><td>missing_disk</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_disk">
	<tr><td>different_disk</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_disk">
	<tr><td>additional_disk</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>




<xsl:template match="serverId">

<h2>serverId</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_serverId">
	<tr><td>missing_serverId</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_serverId">
	<tr><td>different_serverId</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_serverId">
	<tr><td>additional_serverId</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="Environments">

<h2>Environments</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_Environment">
	<tr><td>missing_Environment</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_Environment">
	<tr><td>different_Environment</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_Environment">
	<tr><td>additional_Environment</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="softwares">

<h2  color="#9acd32">Softwares</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_software">
	<tr><td>missing_software</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_software">
	<tr><td>badversion_software</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_software">
	<tr><td>additional_software</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="hotfixes">

<h2>Hotfixes</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_hotfixe">
	<tr><td>missing_hotfixe</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_hotfixe">
	<tr><td>different_hotfixe</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_hotfixe">
	<tr><td>additional_hotfixe</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="Services">

<h2>Services</h2>

 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Comment</th>
      </tr>	   	
      <xsl:apply-templates select="*"/>    
 </table>
	<hr/>
</xsl:template>

<xsl:template match="missing_Service">
	<tr><td>missing_Service</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="different_Service">
	<tr><td>different_Service</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>

<xsl:template match="additional_Service">
	<tr><td>additional_Service</td><td><xsl:value-of select="."/></td></tr>
</xsl:template>


<xsl:template match="directories">

  <h2>Directories </h2>
  <xsl:apply-templates select="*"/>    
  
</xsl:template>

<xsl:template match="added_directory">
    <h3> Directory </h3>
	<p> The following directory information is added  : <xsl:value-of select="."/> </p>
</xsl:template>   

<xsl:template match="missing_directory">
	<h3> Directory </h3>
	<p> The following directory information is missing  : <xsl:value-of select="."/>  </p>
</xsl:template>

<xsl:template match="directory">


<h3>Directory </h3>

 <p>Name : <xsl:value-of select="attributes/Name"/> </p>
 <p>Pattern : <xsl:value-of select="attributes/pattern"/> </p>
 <xsl:apply-templates select="files"/>    

</xsl:template>

<xsl:template match="files">	  
 <table WIDTH='100%' BORDER='1' BORDERCOLOR='#000001' CELLPADDING='1' CELLSPACING='0'>
      <tr bgcolor="#9acd32">
        <th>Issue</th>
		<th>Filename</th>
		<th>details</th>
      </tr>	   
	  <xsl:apply-templates select="*"/>    
	  </table>
	<p/><p/><hr/><p/><p/>
</xsl:template>


<xsl:template match="different_file">	  
     <tr><td>different_file</td>
	     <td><xsl:value-of select="name"/></td>
		 <td>original was <p/> <xsl:value-of select="content1"/> <p/> 
		     current file is : <p/> <xsl:value-of select="content2"/></td>
	</tr>
</xsl:template>

<xsl:template match="added_file">	  
   <tr><td>added file</td><td><xsl:value-of select="."/></td><td></td></tr>
</xsl:template>	  

<xsl:template match="missing_file">	  
   <tr><td>missing file</td><td><xsl:value-of select="."/></td><td></td></tr>
</xsl:template>	  


	
</xsl:stylesheet>